<admintpl file="header" />
<style>
.well{font-size:12px;}
select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input{
padding:0px;
}
.table>thead>tr>th{border-bottom:none;}
</style>
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="javascript:;">学生信息管理</a></li>
		</ul>
		<div style="width:100%;height:40px;">
			<a href="export.php?f={$postData['exportFrom']}" class="btn btn-primary">导出学生信息</a>
		</div>
		<form class="well form-search" method="post" action="admin.php?g=Admin&m=Studentsys&a=index">
			        行政区： 
				<select name="qu" id="qu" style="width:90px;">
				    <option value="all">所有区</option>
				    <foreach name="quData" item="qu">
	                 <option value="{$qu}" <if condition="$qu eq $postData['activequ']">selected="selected"</if> >{$qu}</option>
	                </foreach>
	                  
	            </select> &nbsp;&nbsp;
	            <script type="text/javascript">
	            $(function() {
	            	$("#qu").change(function(){
	            		var _qu=$(this).val();
	            		window.location.href="admin.php?g=Admin&m=Studentsys&a=index&qu="+_qu;
	            	});
	            });
	            </script>  
		         学生姓名： 
			<input type="text" name="name" style="width:90px;" value="{$postData['name']}" placeholder=""> 
			 手机号： 
			<input type="text" name="phone" style="width:90px;" value="{$postData['phone']}" placeholder="">&nbsp;&nbsp;
			 学籍号： 
			<input type="text" name="xjh" style="width:90px;" value="{$postData['xjh']}" placeholder="">&nbsp;&nbsp;
			<input type="submit" class="btn btn-primary" value="搜索" />
		</form>
		<form class="js-ajax-form" action="" method="post">
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="50">准考证</th>
						<th width="50">区县</th>
						<th width="90">学校</th>
						<th width="60">年级</th>
						<th width="50">姓名</th>
						<th width="50">指导老师</th>
						<th width="90">考场</th>
						<th width="160">身份证</th>
						<th width="90">手机号</th>
						<th width="60">操作</th>
					</tr>
				</thead>
				<foreach name="studentInfo" item="student">
					<tr>
						<td><b>{$student['hao']}</b></td>
						<td><b>{$student['qu']}</b></td>
						<td><b>{$student['school']}</b></td>
						<td><b>{$student['nianji']}</b></td>
						<td><b>{$student['name']}</b></td>
						<td><b>{$student['teacher']}</b></td>
						<td><b>{$student['kc']}</b></td>
						<td><b>{$student['idcard']}</b></td>
						<td><b>{$student['phone']}</b></td>
						<td>
							<a href="admin.php?g=Admin&m=Studentsys&a=edit&id={$student['id']}&p={$postData['p']}">编辑</a>
							<if condition="$postData['adminName'] eq 'admin' ">
							&nbsp;&nbsp;<a href="admin.php?g=Admin&m=Studentsys&a=clean&id={$student['id']}">清理</a>
						    </if>
						</td>
					</tr>	
				</foreach>			
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="public/js/common.js"></script>
	<script>
		$(function() {
			setCookie("refersh_time", 0);
			Wind.use('ajaxForm', 'artDialog', 'iframeTools', function() {
				//批量复制
				$('.js-articles-copy').click(function(e) {
					var ids=[];
					$("input[name='ids[]']").each(function() {
						if ($(this).is(':checked')) {
							ids.push($(this).val());
						}
					});
					
					if (ids.length == 0) {
						art.dialog.through({
							id : 'error',
							icon : 'error',
							content : '您没有勾选信息，无法进行操作！',
							cancelVal : '关闭',
							cancel : true
						});
						return false;
					}
					
					ids= ids.join(',');
					art.dialog.open("/index.php?g=portal&m=AdminPost&a=copy&ids="+ ids, {
						title : "批量复制",
						width : "300px"
					});
				});
				//批量移动
				$('.js-articles-move').click(function(e) {
					var ids=[];
					$("input[name='ids[]']").each(function() {
						if ($(this).is(':checked')) {
							ids.push($(this).val());
						}
					});
					
					if (ids.length == 0) {
						art.dialog.through({
							id : 'error',
							icon : 'error',
							content : '您没有勾选信息，无法进行操作！',
							cancelVal : '关闭',
							cancel : true
						});
						return false;
					}
					
					ids= ids.join(',');
					art.dialog.open("/admin.php?g=portal&m=AdminPost&a=move&old_term_id=0&ids="+ ids, {
						title : "批量移动",
						width : "300px"
					});
				});
			});
		});
	</script>
</body>
</html>